import pandas as pd


def combine(save_dir, interval):
    data_counts = pd.read_csv(save_dir + str(interval) + '_counts_data_gai_final')
    data_poi = pd.read_csv(save_dir + 'POI_data.csv')
    data_weather = pd.read_csv(save_dir + 'weather_data.csv')

    data = pd.merge(data_counts, data_weather, on=['month_day', 'hour'], how='left')
    data = pd.merge(data, data_poi, on='grid_id', how='left')
    data = data.drop(['city'], axis=1)
    data = data.fillna(0)
    data.to_csv(save_dir + str(interval) + '_chengdu_data_gai', index=False)

